package com.结构型模式.代理模式.静态代理;

/**
 * @author chenhs
 * @date 2020/10/13
 */
public class AgentB implements  ISubject {
	private    SubjectImpl subject;
	public AgentB(){
		if(subject==null){
			this.subject =new SubjectImpl();
		}
	}
	@Override
	public void speak() {
		front();
		subject.speak();
		queen();
	}
	private  void front(){
		System.out.println("前置真强B");
	}
	private  void queen(){
		System.out.println("后置真强B");
	}
}
